import request from './request.js'

// session请求
function sessionNetwork(data) {
  return request({
    url: 'getSessionKey',
    method: 'GET',
    data
  })
}
// 解析phone code
function parsingPhoneCode(data) {
  return request({
    url: 'getPhone',
    method: 'POST',
    data
  })
}
// 解析code获取token
function parsingCodeToken(data) {
  return request({
    url: 'token',
    method: 'POST',
    data
  })
}
// 头像昵称处理
function uploadUserInfo(data) {
  return request({
    url: 'updateNickName',
    method: 'POST',
    data
  })
}

module.exports = {
  sessionNetwork,
  parsingPhoneCode,
  parsingCodeToken,
  uploadUserInfo
}